str = input("请输入文字:\n")
with open('D://hello.txt','a') as f:
    f.write(str+"\n")
    f.close()